1. Field of the Invention
The present invention relates to an apparatus for detecting memory protection violations in microprogram controlled data processors.
2. Description of the Prior Art
Computer systems which can implement multiuser-multitask processings on the basis of segmentation have widely been used recently. Here, segmentation means dividing a series of program units into a plurality of united microinstructions so as to be recognized as a single unit during succeeding execution. In these computer systems, it is necessary and important to protect one's own private segment from other people's segments or protect one's own private segments from an error or a mistake in one's own different program.
There are the following memory protection methods: ring protection (privilege protection), write protection, segment type protection, and descriptor enable protection (a descriptor is a word or a phrase used to discriminate a file).
In ring protection (privilege protection), memory is protected by limiting or prohibiting access to a segment with a higher privilege level. In write protection, data writing to code segments is prohibited, and data writing to stack segments (a stack implies an area for temporarily storing data) is always enabled. In segment type protection, descriptors of data segments or other segments are prohibited from being read in a changing instruction segment, for instance. In descriptor enable protection, an invalid descriptor is prohibited from being read.
The above-mentioned memory protection information is stored in a descriptor provided for each segment. Whenever segments are changed in accordance with a program, the corresponding descriptor is read from the memory to check the memory protection information in accordance with a microprogram.
In the above-mentioned prior-art memory protection checking methods, after a descriptor has been read from a memory unit, memory protection information is extracted from the read descriptor one by one in series by a microprogram to compare the information data with a proper value for checking the memory protection violation. In this method, since the checking operations are repeated by the number corresponding to the kinds of memory protection information required to be checked, there exists a problem in that it takes a great deal of time to check a memory protection violation when the kinds of protection information required to be checked increase.